#!/usr/bin/env bash

nohup firefox http://web.sanguosha.com/login/index.html &
sleep 2
echo $PATH
isExitMysql=`docker ps | grep mysql | awk '{ print $2}'`
if [[ ${isExitMysql} != mysql ]]; then
    docker start mysql;
	sleep 5;
fi

java -version
java -Djava.awt.headless=false -jar /home/xieweig/IdeaProjects/sha/target/sha-1.0-SNAPSHOT.jar \
--sha.accounts=1,2,3,4,5,6,7
#--sha.accounts=1,2,3,4,5,6,7
echo end_job
if [[ "$1" = shutdown ]]; then

docker stop mysql
echo 123654 | sudo -S shutdown -h +5

fi
